package cn.gxljc.technology.store_management.service.superadminservice;

import cn.gxljc.technology.store_management.service.superadminservice.modules.UserManagement;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

/**
 * 该类主要用于服务与超级管理员所有的业务需求
 */

@Service
public class SuperAdminService {

    @Resource(name = "userManagement")
    private UserManagement userManagement;

    /**
     * 业务功能：分配账户
     */
    public Integer createAccount(long accountID, String accountName) {
        return userManagement.createAccount(accountID, "1234", accountName);
    }

    /**
     * 业务功能：删除账户
     */
    public Integer deleteAccount(long accountID) {
        return userManagement.deleteAccount(accountID);
    }

    /**
     * 业务功能：设置权限
     */
    public Integer setAuthority(long accountID, Integer type) {
        return userManagement.setAuthority(accountID, type);
    }

}
